import { MidwayConfig} from '@midwayjs/core';

export default {
  // use for cookie sign key, should change to your own and keep security
  keys: '1685640671647_4395',
  koa: {
    port: 7001,
  },
  orm: {
    type: 'mysql',
    host: '127.0.0.1',
    port: 3306,
    username: 'root',
    password: 'zxcvbnm123',
    database: 'wechat',
    synchronize: false,
    logging: true,
},
jwt: {
  secret:'setscrew',
  expiresIn: 60 * 60 * 24
},
redis: {
  client: {
    host: '127.0.0.1',
    port: '6379',
    db: 0
  }
},
app: {
  security:{
    prefix:'/api/admin',
    ignore:['/api/admin/login']
  }
},
cors: {
  credentials: false,
}, 
staticFile: {
  dirs: {
    default: {
      prefix: '/public/upload',
      dir: '/'
    }
  }
},
} as MidwayConfig;
